import urllib, re

linkregex = re.compile('[\'|"](.*?)[\'"].*?')
data = urllib.urlopen("http://failblog.org/").read()
links = linkregex.findall(data)
pics = []
for link in links:
    if ".jpg" in link and "files" in link:
        pics.append(link)
print(pics)
